<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--jstl을 쓰기 위해 사용 --%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%--숫자 포맷을 사용하기 위해 사용 --%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%><%--함수들을 이용하기 위해 사용 --%>
<%@ taglib prefix="c-rt" uri="http://java.sun.com/jstl/core_rt" %>  <%-- ie버전 확인에 쓰기 위해 씀 --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<!--<script type="text/javascript" src="script/sms_riskI_script.js"></script>-->
<script type="text/javascript">  
//텝 메뉴 실행
$(function(){
	$( "#tabs" ).tabs(); 
}); 

//onclick시 이동관련
$(function(){
$('ul.tab-menu li a').click(function() {
    //alert($(this).attr('href'));
    location.href=$(this).attr('href');
});
}
); 
</script>  
</head>
<body>
<div class="box1">
  <div id="tabs">

       <ul class="tab-menu">

           <li><a href="#tabs-1" class="t1">RA자산식별</a></li>

           <li><a href="#tabs-2" class="t2">RA자산평가</a></li>


       </ul>
<!-- RA자산 식별 시작 -->
<div id="tabs-1" style="display:none">
      		<h4 class="white">
      			<span class="align-left">RA자산식별</span>
	      		<span class="align-right">상태 :
		      		<c:choose>
		      			<c:when test="${sessionScope.magamSession[1].state =='Y'}">
		      				 마감
		      			</c:when>
		      			<c:otherwise>
		      				 착수
		      			</c:otherwise>
		      		</c:choose>
	      		</span>
      		</h4>
        <div class="box-container1">     		
        
        	<table class="table-long">
      			<tfoot>
      				<tr>
      					<td>
      					<div class="align-left"><a href="#" class="button1 firstButton"><span style="font-size: small; font-weight:normal;">전체 : ${fn:length(list)}</span></a></div>

      					<div class="align-right"><!--select class="form-select"><option value="option1">Bulk Options</option>
      					<option value="option2">Delete All</option></select-->
      					
                        	<input type="hidden" name="reloadPageName"  value="mraasset"></input>
                        	<a href="riskIAction.do?mode=exmraasset&searchText=${param.searchText }" class="button"><span>엑셀</span></a> 
	                        	<c:choose>
	                        		<c:when test="${sessionScope.magamSession[1].state !='Y'}">
	                        		<!-- 마감 현황이 유무 판별(Y 시 입력 불가) -->
	                        		<%--
	                        		<input type="file" name="file"></input><a href="#" class="button"  onclick="fileupload()"><span>엑셀업</span></a>
	                        		--%>

	                        			
	                        			<a href="#" class="button" onclick="javascript: riskIWritePage('mraasset_insertPage')"><span>추가</span></a>
                        				<a href="#" class="button lastButton" onclick="javascript: riskIDelete()"><span>삭제</span></a>
	                        		</c:when>
	                        		<c:otherwise>
	                        			<a href="#" class="button1 addMargin" onclick="return false" ><span>추가</span></a>
	                        			<a href="#" class="button1 lastButton addMargin" onclick="return false"><span>삭제</span></a>
	                        		</c:otherwise>
	                        	</c:choose>
                        </div>
                        
                        <!-- 검색 -->
      					<div class="align-right" style="margin-right: 80px">
    						<span style="width: 22px; height: 22px; background: url('img/icon-view-info.gif') no-repeat scroll right center transparent;  overflow: hidden;display:inline-block;"></span>
    						<span style="vertical-align: top"><input name="searchText" type="text" id="searchText" style="width:140px;" value="${param.searchText }" /></span>
    						<span><a href="#" class="button rightNoMargin verticTop" onclick="searchText('mraasset')"><span>조회</span></a></span>
   						</div>
                        
                        </td>
      				</tr>
      				<tr><td class="spaceLine"></td></tr>
      			</tfoot>
      		</table>
      	<form name="riskIDelForm" action="riskIAction.do" method="post">
        	<input type="hidden" name="mode" value="mraasset_delete"></input>
        	<input type="hidden" name="pro_id" value="${sessionScope.lastProId }"></input>
      		<table class="table-long">
      			<colgroup>
				<!-- ie67인지 아닌지 판단 (위=ie)(아래는 그외)--> 
							<col width="40px"/>
							<col width="16%"/>
							<col width="16%"/>
							<col width="16%"/>
							<col width="16%"/>
							<col width="16%"/>
							<col/>
							<col width="15px"/>
				</colgroup>	
      			<thead>
      				<tr>
      					<td class="col-chk"><input type='checkbox' name='checkAll' onclick="javascript: selectAll()" class="chkCursor"></input></td>
      					<%--<td class="col-rowspanMid">RA자산코드</td> --%>
      					<td class="col-rowspanMid">RA자산명칭</td>
      					<%--<td class="col-rowspanMid">갱신일자</td> --%>
      					<td class="col-rowspanMid">자산유형</td>
      					<td>RA자산 소유자</td>
      					<td>RA자산 관리자</td>
      					<td class="col-rowspanMid">RA자산설명</td>
      					<td class="col-rowspanMid">연관프로세스</td>
      					<td></td>
      				</tr>
      			</thead>
      		</table>
      		<div  class="scrollDIV" style="height: 470px;">
      		<table class="table-long">
      			<colgroup>
							<col width="40px"/>
							<col width="16%"/>
							<col width="16%"/>
							<col width="16%"/>
							<col width="16%"/>
							<col width="16%"/>
							<col/>
							<col width="15px"/>
				</colgroup>
      			<tbody>
      				<c:choose>
                    	<c:when test="${fn:length(list)!= 0}">
                       	<c:forEach var="list" items="${requestScope.list}" varStatus="status">
                   			<%--
                   			<tr onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');" class="odd">
                   			 --%>
                   			  <tr <c:if test="${status.index%2==0 }">class="odd"</c:if> onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');">
                    			<td class="col-chk"><input type="checkbox" name="check" id="check00${status.index+1 }" value='${list.raitem_id}' class="chkCursor"></input></td>
                    			<%--
                    			<td>
                    				<!-- ie6에서 한글 깨짐 방지를 위한 전달 방법 -->
	                    			<c:url var="url" value="riskIAction.do">
	                    				<c:param name="mode" value="mraasset_updatePage"/>
									    <c:param name="raitem_id" value="${list.raitem_id }"/>
									</c:url>
	                    				<div class="ellipsis"  style="width:100%;">
	                    				<a href="<c:out value="${url}"/>" class="nor ellipsis" title='${list.raitem_id }'>${list.raitem_id }</a>
	                    				</div>
                    			</td>
                    			 --%>
                    			<td style="word-wrap:break-word">
                    				<!-- ie6에서 한글 깨짐 방지를 위한 전달 방법 -->
	                    			<c:url var="url" value="riskIAction.do">
	                    				<c:param name="mode" value="mraasset_updatePage"/>
									    <c:param name="raitem_id" value="${list.raitem_id }"/>
									</c:url>
	                    				<a href="<c:out value="${url}"/>" class="nor" title='${list.raitem_nm }'>${list.raitem_nm }</a>
                    			</td>
                    			<%--
                    			<td title="${list.raitem_date }" style="word-wrap:break-word">
                    				${list.raitem_date }
                    			</td>
                    			 --%>
                    			<td>
                    				<div class="ellipsis" style="width:100%;" title="${list.ak_nm2 }">${list.ak_nm2 }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis" style="width:100%;" title="${list.raitem_owner }">${list.raitem_owner }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis" style="width:100%;" title="${list.raitem_manager }">${list.raitem_manager }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis" style="width:100%;" title="${list.raitem_etc }">${list.raitem_etc }</div>
                    			</td>
                    			<td>
                    				<a href="#" class="button" style="margin:0;" onclick="javascript: openMappingCount('${list.raitem_id}')"><span>정보 (${list.mappingCount })</span></a>
                    			</td>
	   					 	<td></td>
                    		</tr>
                    	</c:forEach>
                    	</c:when>
                    	<c:otherwise>
                    		<tr class="odd">
								<td colspan="8" class="noDataTD">-데이터가 없습니다-</td>
							</tr>
                    	</c:otherwise>
                    	</c:choose>
      			</tbody>
      		</table>  	
      		</div>
      		</form>
      	</div><!-- end of div.box-container1 -->
   	</div><!-- RA자산 식별 끝작 -->
      	      	
 	      	<!-- RA자산평가 시작 -->
      	<div id="tabs-2" style="display:none">
      		<h4 class="white">
      			<span class="align-left">RA자산평가</span>
	      		<span class="align-right">상태 :
		      		<c:choose>
		      			<c:when test="${sessionScope.magamSession[1].state =='Y'}">
		      				 마감
		      			</c:when>
		      			<c:otherwise>
		      				 착수
		      			</c:otherwise>
		      		</c:choose>
	      		</span>
      		</h4>
        <div class="box-container1">     		
        	<table class="table-long">
      			<tfoot>
      				<tr>
      					<td>
						<div class="align-left">      					
      						<a href="#" class="button1 firstButton"><span style="font-size: small;">평가 완료 / 전체 : ${fn:length(plist) } / ${fn:length(plist)}</span></a>
      					</div>
      					
      					<div class="align-right"><!--select class="form-select"><option value="option1">Bulk Options</option>
      					<option value="option2">Delete All</option></select-->
      					<a href="riskIAction.do?mode=exmraassetp&searchText=${param.searchText1 }" class="button"><span>엑셀</span></a> 
                         <c:choose>
                       		<c:when test="${sessionScope.magamSession[1].state !='Y'}">
                       		<!-- 마감 현황이 유무 판별(Y 시 입력 불가) -->
                       			<a href="#" class="button lastButton" onclick="javascript: riskIDelete1()"><span>삭제</span></a>
                       		</c:when>
                       		<c:otherwise>
                        		<a href="#" class="button1 lastButton addMargin" onclick="return false;"><span>삭제</span></a>
                       		</c:otherwise>
                       	</c:choose>
                        </div>
                        
                        <!-- 검색 -->
      						<div class="align-right" style="margin-right: 85px">
	      						<span style="width: 22px; height: 22px; background: url('img/icon-view-info.gif') no-repeat scroll right center transparent;  overflow: hidden;display:inline-block;"></span>
	      						<span style="vertical-align: top"><input name="searchText1" type="text" id="searchText1" style="width:140px;" value="${param.searchText1 }"/></span>
	      						<span ><a href="#" class="button rightNoMargin verticTop" onclick="searchText1('mraasset', 2)"><span>조회</span></a></span>
      						</div>
                        
                        </td>
      				</tr>
      				<tr><td class="spaceLine"></td></tr>
      			</tfoot>
      		</table>
     		 <form name="riskIDelForm1" action="riskIAction.do" method="post">
        	<input type="hidden" name="mode" value="mraassetp_delete"></input>
        	<input type="hidden" name="pro_id" value="${sessionScope.lastProId }"></input>
   	        	<input type="hidden" name="reloadPageName" value="#tabs-2"></input>
      		<table class="table-long">
      			<colgroup>
				<!-- ie67인지 아닌지 판단 (위=ie)(아래는 그외)--> 
					<c-rt:choose>
						<c-rt:when test="${isMSIE67}">
							<col width="25px"/>
							<%--
							<col width="79px"/>
							<col width="76px"/>
							<col width="67px"/>
							 --%>
							<col width="116px"/>
							<col width="107px"/>
							<col width="52px"/>
							<col width="56px"/>
							<col width="56px"/>
							<col width="15px"/>
							<col width="19px"/>
							<col width="19px"/>
							<col width="35px"/>
							<col width="35px"/>
							<col width="51px"/>
							<col/>
							<col width="15px"/>
						</c-rt:when>
						<c-rt:otherwise>
							<col width="39px"/>
							<%--
							<col width="80px"/>
							<col width="79px"/>
							<col width="69px"/>
							 --%>
							 <col width="119px"/>
							<col width="109px"/>
							<col width="59px"/>
							<col width="59px"/>
							<col width="59px"/>
							<col width="14px"/>
							<col width="14px"/>
							<col width="14px"/>
							<col width="42px"/>
							<col width="42px"/>
							<col width="50px"/>
							<col/>
							<col width="15px"/>
						</c-rt:otherwise>
					</c-rt:choose>				
				</colgroup>	
      			<thead>
      				<tr>
      					<td class="col-chk" rowspan="2"><input type='checkbox' name='checkAll1' onclick="javascript: selectAll1()" class="chkCursor"></input></td>
      					<%--<td class="col-rowspanMid" rowspan="2">자산코드</td> --%>
      					<td class="col-rowspanMid" rowspan="2">자산명칭</td>
      					<td class="col-rowspanMid" rowspan="2">자산유형</td>
      					<td colspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      						RA정보보안요구사항
      					</td>
      					<td colspan="6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      						RA정보가치평가
      					</td>
      					<td class="col-rowspanMid"  rowspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      						연관정보
      					</td>
      					<td></td>
      				</tr>
      				<tr>
      					<td style="padding-left: 2px" class="col-rowspanMid">기밀성</td>
      					<td class="col-rowspanMid">무결성</td>
      					<td class="col-rowspanMid">가용성</td>
      					<td class="col-rowspanMid">C</td>
      					<td class="col-rowspanMid">I</td>
      					<td class="col-rowspanMid">A</td>
      					<td>보안<br/>점수</td>
      					<td>보안<br/>등급</td>
      					<td>기밀<br/>등급</td>
      					<td></td>
      				</tr>
      			</thead>
      		</table>
      		<div class="scrollDIV" style="height: 475px;">
      		<table class="table-long">
      			<colgroup>
				<!-- ie67인지 아닌지 판단 (위=ie)(아래는 그외)--> 
					<c-rt:choose>
						<c-rt:when test="${isMSIE67}">
							<col width="25px"/>
							<%--
							<col width="79px"/>
							<col width="76px"/>
							<col width="67px"/>
							 --%>
							<col width="116px"/>
							<col width="107px"/>
							<col width="52px"/>
							<col width="52px"/>
							<col width="52px"/>
							<col width="15px"/>
							<col width="15px"/>
							<col width="15px"/>
							<col width="31px"/>
							<col width="31px"/>
							<col width="47px"/>
							<col/>
							<col width="15px"/>
						</c-rt:when>
						<c-rt:otherwise>
							<col width="39px"/>
							<%--
							<col width="80px"/>
							<col width="79px"/>
							<col width="69px"/>
							 --%>
							 <col width="119px"/>
							<col width="109px"/>
							<col width="59px"/>
							<col width="59px"/>
							<col width="59px"/>
							<col width="14px"/>
							<col width="14px"/>
							<col width="14px"/>
							<col width="42px"/>
							<col width="42px"/>
							<col width="50px"/>
							<col/>
							<col width="15px"/>
						</c-rt:otherwise>
					</c-rt:choose>				
				</colgroup>
      			<tbody>
      				<c:choose>
                    	<c:when test="${fn:length(plist)!= 0}">
                       	<c:forEach var="list" items="${requestScope.plist}" varStatus="status">
                   			<%--
                   			<tr onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');" class="odd">
                   			 --%>
                   			  <tr <c:if test="${status.index%2==0 }">class="odd"</c:if> onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');">
                    			<td class="col-chk"><input type="checkbox" name="check1" id="check10${status.index+1 }"  value='${list.raitem_id}'  class="chkCursor"></input></td>
                    			<%--
                    			<td>
                    				<a href="riskIAction.do?mode=mraassetp_updatePage&raitem_id=${list.raitem_id }" class="nor" title='${list.raitem_id }'>${list.raitem_id }</a>
                    			</td>
                    			 --%>
                    			<td style="word-wrap:break-word">
                    				<!-- ie6에서 한글 깨짐 방지를 위한 전달 방법 -->
	                    			<c:url var="url" value="riskIAction.do">
	                    				<c:param name="mode" value="mraassetp_updatePage"/>
									    <c:param name="raitem_id" value="${list.raitem_id }"/>
									</c:url>
	                    				<a href="<c:out value="${url}"/>" class="nor" title='${list.raitem_nm }'>${list.raitem_nm }</a>
                    			</td>
                    			<td>
                    				<div class="ellipsis" style="width:100%;" title="${list.ak_nm2 }">${list.ak_nm2 }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis" style="width:100%;" title="${list.c_memo }">${list.c_memo }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis" style="width:100%;" title="${list.i_memo }">${list.i_memo }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis" style="width:100%;" title="${list.a_memo }">${list.a_memo }</div>
                    			</td>
                    			<td>
                    				<fmt:formatNumber value="${list.c_score }" pattern="0"/>
                    			</td>
                    			<td>
                    				<fmt:formatNumber value="${list.i_score }" pattern="0"/>
                    			</td>
                    			<td>
                    				<fmt:formatNumber value="${list.a_score }" pattern="0"/>
                    			</td>
                    			<td>
                    				&nbsp;&nbsp;<fmt:formatNumber value="${list.t_score }" pattern="0"/>
                    			</td>
                    			<td>
                    				<div class="ellipsis" style="width:100%;" title="${list.ascu_level }">${list.ascu_level }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis" style="width:100%;" title="${list.asc_level }">${list.asc_level }</div>
                    			</td>
                    			<td>
                    				<a href="#" class="button"  style="margin:0 0 0 10px;" onclick="javascript: openMappingCount('${list.raitem_id}')"><span>정보 (${list.mappingCount })</span></a>
                    			</td>
	   					 	<td></td>
                    		</tr>
                    	</c:forEach>
                    	</c:when>
                    	<c:otherwise>
                    		<tr class="odd">
								<td colspan="14"  class="noDataTD">-데이터가 없습니다-</td>
							</tr>
                    	</c:otherwise>
                    	</c:choose>
      			</tbody>
      		</table>  	
      		</div>
      		</form>
      	</div><!-- end of div.box-container1 -->  	
      	
      	
      	
      	</div><!-- RA자산 평가 끝 -->
      	
      	</div> <!-- 탭 메뉴 끝 -->
      	
      	</div> <!-- end of div.box -->
</body>
</html>